{include file="public/layout" /}
<body style="background-color: #FFF; overflow: auto;">
<div id="toolTipLayer" style="position: absolute; z-index: 9999; display: none; visibility: visible; left: 95px; top: 573px;"></div>
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page">
    {include file="admin/admin_bar" /}
    <form class="form-horizontal" id="adminAdd" action="{:U('Admin/admin_add')}" method="post">
        <div class="ncap-form-default">
            <dl class="row none">
                <dt class="tit">
                    <label><em>*</em>所属角色</label>
                </dt>
                <dd class="opt">
                    <select name="role_id" id="role_id">
                        <!-- <option value="">--请选择--</option> -->
                        {eq name="$Think.session.admin_info.role_id" value="-1"}
                        <option value="-1" selected="true">超级管理员</option>
                        {/eq}
                        {$select_html}
                    </select>
                    <span class="err"></span>
                    <p class="notic"></p>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="user_name"><em>*</em>用户名</label>
                </dt>
                <dd class="opt">
                    <input type="text" name="user_name" value="" id="user_name" class="input-txt">
                    <p class="notic"></p>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="password"><em>*</em>登录密码</label>
                </dt>
                <dd class="opt">
                    <input type="password" name="password" value="" id="password" class="input-txt">
                    <p class="notic"></p>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="true_name">真实姓名</label>
                </dt>
                <dd class="opt">
                    <input type="text" name="true_name" value="" id="true_name" class="input-txt">
                    <p class="notic"></p>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="mobile">手机号码</label>
                </dt>
                <dd class="opt">
                    <input type="text" name="mobile" value="" id="mobile" class="input-txt">
                    <p class="notic"></p>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="email">Email邮箱</label>
                </dt>
                <dd class="opt">
                    <input type="text" name="email" value="" id="email" class="input-txt">
                    <p class="notic"></p>
                </dd>
            </dl>
            <div class="bot"><a href="JavaScript:void(0);" onclick="adsubmit();" class="ncap-btn-big ncap-btn-green" id="submitBtn">确认提交</a></div>
        </div>
    </form>
</div>
<script type="text/javascript">
    // 判断输入框是否为空
    function adsubmit(){
        if($('#role_id').val() == ''){
            // layer.tips('请选择所属角色！', '#role_id', {tips: 3});
            layer.msg('请选择所属角色！', {icon: 2,time: 1000});
            return false;
        }
        if($('input[name=user_name]').val() == ''){
            layer.msg('用户名不能为空！', {icon: 2,time: 1000});
            return false;
        }
        if($('input[name=password]').val() == ''){
            layer.msg('密码不能为空！', {icon: 2,time: 1000});
            return false;
        }
        layer_loading('正在处理');
        $('#adminAdd').submit();
    }
</script>

{include file="public/footer" /}